<template>
   <div>
      <div class="banner" @click="handleClick">
        <img class="banner-img" src="http://img1.qunarzz.com/sight/p0/1508/f7/f7c3be996152011c.img.jpg_600x330_dfb694b6.jpg" alt="">
        <div class="banner-info">
            <div class="banner-title">南京总统府(AAAA景区)</div>
            <div class="banner-number "><span class="iconfont banner-icon">&#xe608;</span>39</div>
        </div>
    </div>
    <common-gallary :imgs="imgs" v-show="showGallary" @close="handleGallaryClose"></common-gallary>
   </div>
</template>

<script>
import CommonGallary from 'common/gallary/Gallary'
export default {
  name: 'DetailBanner',
  components: {
    CommonGallary
  },
  data () {
    return {
      imgs: ['http://img1.qunarzz.com/sight/p0/1604/4a/4a8ac5bde1092d9190.water.jpg_r_800x800_2ef76fed.jpg'],
      showGallary: false
    }
  },
  methods: {
    handleClick () {
      this.showGallary = true
    },
    handleGallaryClose () {
      this.showGallary = false
    }
  }
}
</script>

<style lang="stylus" scoped>
.banner
  position relative
  overflow hidden
  height 0
  padding-bottom 55%
  .banner-img
    width 100%
   .banner-info
      position absolute
      display flex
      left 0
      right 0
      bottom 0
      line-height .6rem
      color #ffffff
      background-image linear-gradient(top, rgba(0,0,0,0),rgba(0,0,0,0.8))
      .banner-title
        font-size .32rem
        padding 0 .2rem
        flex 1
      .banner-number
        padding 0 .4rem
        height .32rem
        line-height .32rem
        border-radius .2rem
        margin-top .14rem
        font-size .24rem
        background rgba(0,0,0,.8)
        .banner-icon
          font-size .24rem
</style>
